class ScientistPawn extends xPawn;

var() int MyPatrolPath;

event PostBeginPlay()
{
  local ScientistPathNode epn;
  local float minDist, curDist;
  local int bestPath;

  super.PostBeginPlay();

  minDist = 0;

  foreach AllActors(class'ScientistPathNode', epn) {
    curDist = VSize(epn.Location - Location);
    //log(""$curdist);
    if (curDist < minDist || minDist == 0) {
      minDist = curDist;
      bestPath = epn.myPatrolPath;
    }
  }
  //log("My best Path is "$bestpath);
  MyPatrolPath = bestPath;

  //log("PatrolPath: "$MyPatrolPath);
  SetPhysics(PHYS_Walking);
}

defaultproperties
{
  bNoWeaponFiring = true
  ControllerClass=Class'Enyara.ScientistController'
  mesh=SkeletalMesh'HumanMaleA.MercMaleA'
  skins(0)=Texture'PlayerSkins.MercMaleABodyD'
  skins(1)=Texture'PlayerSkins.MercMaleAHeadB'
}
